export default {
    mode: "history",
    routes: [
        {
            path: "/",
            alias: "/index*", //路径别名
            component: () => import("@/view/HomeView"), //是个箭头函数 跳转对应组件 
            meta:{
                auth:true //表示需要鉴权
            },
            children: [
                {
                    //欢迎页面
                    path: "",
                    name: "Main",
                    component: () => import("@/components/MainComp"),
                    meta:{
                        auth:true //表示需要鉴权
                    }
                    
                },
                {
                    //订单页面
                    path: "/order",
                    name: "Order",
                    component: () => import("@/components/orderComp"),
                    meta:{
                        auth:true //表示需要鉴权
                    }
                    
                },
                {
                    //轮播图
                    path: "/banners",
                    name: "Banners",
                    component: () => import("@/components/BannersComp"),
                    meta:{
                        auth:true //表示需要鉴权
                    }
                },
                {
                    //社区频道导航
                    path: "/navs",
                    name: "Navs",
                    component: () => import("@/components/NavsComp"),
                    meta:{
                        auth:true //表示需要鉴权
                    }
                },
                {
                    //管理员公告
                    path: "/announcements",
                    name: "Announcements",
                    component: () => import("@/components/AnnouncementsComp"),
                    meta:{
                        auth:true //表示需要鉴权
                    }
                },
                {
                    //社区与帖子
                    path: "/posts",
                    name: "Posts",
                    component: () => import("@/components/PostsComp"),
                    meta:{
                        auth:true //表示需要鉴权
                    }
                },
                {
                    //社区与图标
                    path: "/tags",
                    name: "Tags",
                    component: () => import("@/components/TagsComp"),
                    meta:{
                        auth:true //表示需要鉴权
                    }
                },
                {
                    //商品
                    path: "/goods",
                    name: "Goods",
                    component: () => import("@/components/GoodsComp"),
                    meta:{
                        auth:true //表示需要鉴权
                    }
                },
                {
                    //取货
                    path: "/pisitions",
                    name: "Pisitions",
                    component: () => import("@/components/PisitionsComp"),
                    meta:{
                        auth:true //表示需要鉴权
                    }
                },
                {
                    //用户
                    path: "/users",
                    name: "Users",
                    component: () => import("@/components/UsersComp"),
                    meta:{
                        auth:true //表示需要鉴权
                    }
                },
                // {   
                //     //管理员中心
                //     path: "/myself",
                //     name: "Myself",
                //     component: () => import("@/components/MyselfComp"),
                //     meta:{
                //         auth:true //表示需要鉴权
                //     }
                // }
            ]
        },
        {
            path: "/login",
            name: "Login",
            component: () => import("@/components/LoginComp")
        },
        {
            path: "/reg",
            name: "Reg",
            component: () => import('@/components/RegComp')
        },
        {
            path: "/auth",
            name: "Auth",
            component: () => import('@/components/AuthComp')
        },
        // {
        //     path:"*",
        //     name:"404",
        //     component:()=>import('@/views/NotFound')
        // },
    ]
}